from wtforms import StringField, IntegerField
from wtforms.validators import DataRequired, Length, Email, Regexp
from app.libs.enums import ClientTypeEnum
from app.models.user import User
from wtforms import ValidationError
from app.validators.base import BaseForm as Form


class MockForm(Form):
    function_name = StringField(validators=[DataRequired(message='不允许为空'), Length(min=1, max=5000)])
    request_data = StringField(validators=[DataRequired(message='不允许为空'), Length(min=1, max=5000)])
    return_data = StringField(validators=[DataRequired(message='不允许为空'), Length(min=1, max=5000)])


class UpdateMockForm(MockForm):
    id = IntegerField(validators=[DataRequired()])


class SelectMockForm(Form):
    function_name = StringField()
    # 写查询不存在的情况
